<?php
require_once('includes/common.php');
?>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
	<link rel="stylesheet" type="text/css" href="css/site.css">
	<script type="text/javascript" src="js/jquery.js"></script> 
    <script type="text/javascript" src="js/jquery.validate.js"></script> 
	
	<script type="text/javascript">

            $('document').ready(function(){

			$('#registerId').validate({

                rules:{
				"fname":{
					required:true
					},
        "phone":{
           required:true,
					number:true,
                    minlength: 10,
                    maxlength: 10
                    },
				"email":{
					required: true,
					email: true,
				    }
			  },
           messages:{

				"fname":{
					required: "First Name is required"
					}, 
                 
                 "phone":{
                    required:"This field is required",
                    number: "Enter valid Number",
					           maxlength: $.format("Phone should be maximum {0} characters long."),
                    minlength: $.format("Phone should be {0} characters long.") 
                    },
				"email":{
					required: "Email is required",
					email: "Enter valid email"
					},
			}      
    });
});
</script> 
</head>
<body>
<form enctype="multipart/form-data"  name="register" action="saveuser.php" method="post" id="registerId" onsubmit="return confirm('Do you really want to submit the form?');">

   <table border="1" cellpadding="0" cellspacing="0" height="50%" width="50%" align="center" class="table table-striped">
    <thead>
    	<tr>
          <td colspan="2"><div id="alert"></td>
        </tr>
   <tr>
    <th colspan="2">Plaese Fill Of The Form Below</th>
   </tr>
  </thead>
  <tbody>
   <tr>
    <td align="right" width="40">First Name :</td>
    <td width="60"><input type="text" autocomplete="off" name="fname" value="" >
    <label for="name" generated="true" class="error"></label></td>
   </tr>
   <tr>
    <td align="right" width="40">Last Name :</td>
    <td width="60"><input type="text" autocomplete="off" name="lname" value="" >
    <label for="name" generated="true" class="error"></label></td>
   </tr>
   <tr>
    <td align="right" width="40">Contact No. :</td>
    <td width="60"><input type="text" autocomplete="off" name="phone" value="" >
    <label for="name" generated="true" class="error"></label></td>
   </tr>
   <tr>
    <td align="right">E-mail :</td>
    <td><input type="text" autocomplete="off" value="" name="email">
	</td>
</tr>
<tr>
    <td align="right">Ticket :</td>
    <td><select name="ticket">
      <option value="350">Super Fan Pass</option>
    </select>
  </td>
</tr>
   <tr>
    <td align="right">&nbsp;</td>
    <td align="left">
    <input class="btn btn-large btn-primary" type="Submit" value="I am done!!" ></td>
   </tr>
  </tbody>
   </table>
  </form>
</body>
</html>
